Skip to content

Inline common access control checks into unchecked helpers - #745

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
snowrugar-beep:fix/issue-739-access-control-helpers
Jul 29, 2026
Merged

Inline common access control checks into unchecked helpers#745
mijinummi merged 1 commit into
MDTechLabs:mainfrom
snowrugar-beep:fix/issue-739-access-control-helpers

Conversation

@snowrugar-beep

Copy link
Copy Markdown
Contributor

Summary

Refactored access control modifiers to invoke a non-inlined internal view function instead of repeating identical check bytecode at every function entry point, reducing deployment bytecode for multi-guarded contracts.

Changes

  • Created contracts/access/GasGuardAccess.sol with internal _checkOwner() helper
  • Modifier onlyOwner delegates to _checkOwner() instead of inlining the check
  • Added standard two-step ownership transfer pattern

Closes #739
Closes #738
Closes #737
Closes #736

Refactor modifier logic into an internal _checkOwner() view function
so that each guarded function reuses a single check routine instead
of duplicating the same bytecode at every entry point.

Closes MDTechLabs#739
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@snowrugar-beep Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mijinummi
mijinummi merged commit 0d3f422 into MDTechLabs:main Jul 29, 2026
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants